// ******************************************************************
// * Copyright(c)  Steven Lu
// * Description   : Entity_MST_CUSTOMER_CONTACT
// * CreateDate    : 2011/11/17 14:17:08
// * Creater       : CodeSmith
// * LastChangeDate: 2011/11/17 14:17:08
// * LastChanger   : 2011/11/17 14:17:08
// * Version Info  : 1.0 For ESOL
// ******************************************************************

using System;
using System.Data;
using System.Collections.Generic;
using System.Text;
using Suzsoft.Smart.EntityCore;
using ESOL.Common.Schema;

namespace ESOL.Common.Entity
{
	[Serializable]
	public partial class MstCustomerContactEntity : EntityBase
    {
        public MstCustomerContactTable TableSchema
        {
            get
            {
                return MstCustomerContactTable.Current;
            }
		}
		
		public MstCustomerContactEntity()
        {

        }
		
		public MstCustomerContactEntity(DataRow dr)
        {
			if(dr == null)
			{
				return;
			}
			this.ContactId = Convert.ToString(CommonFunctions.ToObject(dr["CONTACT_ID"]));
			this.CustomerId = Convert.ToString(CommonFunctions.ToObject(dr["CUSTOMER_ID"]));
			this.ContactLevel = Convert.ToString(CommonFunctions.ToObject(dr["CONTACT_LEVEL"]));
			this.ContactDepartment = Convert.ToString(CommonFunctions.ToObject(dr["CONTACT_DEPARTMENT"]));
			this.ContactName = Convert.ToString(CommonFunctions.ToObject(dr["CONTACT_NAME"]));
			this.ContactMobilephone = Convert.ToString(CommonFunctions.ToObject(dr["CONTACT_MOBILEPHONE"]));
			this.ContactAge = Convert.ToInt32(CommonFunctions.ToObject(dr["CONTACT_AGE"]));
			this.ContactJobTitle = Convert.ToString(CommonFunctions.ToObject(dr["CONTACT_JOB_TITLE"]));
			this.ContactOfficePhone = Convert.ToString(CommonFunctions.ToObject(dr["CONTACT_OFFICE_PHONE"]));
			this.ContactFax = Convert.ToString(CommonFunctions.ToObject(dr["CONTACT_FAX"]));
			this.ContactEmail = Convert.ToString(CommonFunctions.ToObject(dr["CONTACT_EMAIL"]));
			this.ContactRemark = Convert.ToString(CommonFunctions.ToObject(dr["CONTACT_REMARK"]));
			this.LastModifiedDate = Convert.ToDateTime(CommonFunctions.ToObject(dr["LAST_MODIFIED_DATE"]));
			this.LastModifiedBy = Convert.ToString(CommonFunctions.ToObject(dr["LAST_MODIFIED_BY"]));
        }
		
		public MstCustomerContactEntity(DataRowView dr)
        {
			if(dr == null)
			{
				return;
			}
			this.ContactId = Convert.ToString(CommonFunctions.ToObject(dr["CONTACT_ID"]));
			this.CustomerId = Convert.ToString(CommonFunctions.ToObject(dr["CUSTOMER_ID"]));
			this.ContactLevel = Convert.ToString(CommonFunctions.ToObject(dr["CONTACT_LEVEL"]));
			this.ContactDepartment = Convert.ToString(CommonFunctions.ToObject(dr["CONTACT_DEPARTMENT"]));
			this.ContactName = Convert.ToString(CommonFunctions.ToObject(dr["CONTACT_NAME"]));
			this.ContactMobilephone = Convert.ToString(CommonFunctions.ToObject(dr["CONTACT_MOBILEPHONE"]));
			this.ContactAge = Convert.ToInt32(CommonFunctions.ToObject(dr["CONTACT_AGE"]));
			this.ContactJobTitle = Convert.ToString(CommonFunctions.ToObject(dr["CONTACT_JOB_TITLE"]));
			this.ContactOfficePhone = Convert.ToString(CommonFunctions.ToObject(dr["CONTACT_OFFICE_PHONE"]));
			this.ContactFax = Convert.ToString(CommonFunctions.ToObject(dr["CONTACT_FAX"]));
			this.ContactEmail = Convert.ToString(CommonFunctions.ToObject(dr["CONTACT_EMAIL"]));
			this.ContactRemark = Convert.ToString(CommonFunctions.ToObject(dr["CONTACT_REMARK"]));
			this.LastModifiedDate = Convert.ToDateTime(CommonFunctions.ToObject(dr["LAST_MODIFIED_DATE"]));
			this.LastModifiedBy = Convert.ToString(CommonFunctions.ToObject(dr["LAST_MODIFIED_BY"]));
        }

        public override TableInfo OringTableSchema
        {
            get
            {
                return MstCustomerContactTable.Current;
            }
        }
		
		#region Perporty List
        public string ContactId
        {
            get { return Convert.ToString(GetData(MstCustomerContactTable.C_CONTACT_ID)); }
            set { SetData(MstCustomerContactTable.C_CONTACT_ID, value); }
        }
		
        public string CustomerId
        {
            get { return Convert.ToString(GetData(MstCustomerContactTable.C_CUSTOMER_ID)); }
            set { SetData(MstCustomerContactTable.C_CUSTOMER_ID, value); }
        }
		
        public string ContactLevel
        {
            get { return Convert.ToString(GetData(MstCustomerContactTable.C_CONTACT_LEVEL)); }
            set { SetData(MstCustomerContactTable.C_CONTACT_LEVEL, value); }
        }
		
        public string ContactDepartment
        {
            get { return Convert.ToString(GetData(MstCustomerContactTable.C_CONTACT_DEPARTMENT)); }
            set { SetData(MstCustomerContactTable.C_CONTACT_DEPARTMENT, value); }
        }
		
        public string ContactName
        {
            get { return Convert.ToString(GetData(MstCustomerContactTable.C_CONTACT_NAME)); }
            set { SetData(MstCustomerContactTable.C_CONTACT_NAME, value); }
        }
		
        public string ContactMobilephone
        {
            get { return Convert.ToString(GetData(MstCustomerContactTable.C_CONTACT_MOBILEPHONE)); }
            set { SetData(MstCustomerContactTable.C_CONTACT_MOBILEPHONE, value); }
        }
		
        public int ContactAge
        {
            get { return Convert.ToInt32(GetData(MstCustomerContactTable.C_CONTACT_AGE)); }
            set { SetData(MstCustomerContactTable.C_CONTACT_AGE, value); }
        }
		
        public string ContactJobTitle
        {
            get { return Convert.ToString(GetData(MstCustomerContactTable.C_CONTACT_JOB_TITLE)); }
            set { SetData(MstCustomerContactTable.C_CONTACT_JOB_TITLE, value); }
        }
		
        public string ContactOfficePhone
        {
            get { return Convert.ToString(GetData(MstCustomerContactTable.C_CONTACT_OFFICE_PHONE)); }
            set { SetData(MstCustomerContactTable.C_CONTACT_OFFICE_PHONE, value); }
        }
		
        public string ContactFax
        {
            get { return Convert.ToString(GetData(MstCustomerContactTable.C_CONTACT_FAX)); }
            set { SetData(MstCustomerContactTable.C_CONTACT_FAX, value); }
        }
		
        public string ContactEmail
        {
            get { return Convert.ToString(GetData(MstCustomerContactTable.C_CONTACT_EMAIL)); }
            set { SetData(MstCustomerContactTable.C_CONTACT_EMAIL, value); }
        }
		
        public string ContactRemark
        {
            get { return Convert.ToString(GetData(MstCustomerContactTable.C_CONTACT_REMARK)); }
            set { SetData(MstCustomerContactTable.C_CONTACT_REMARK, value); }
        }
		
        public DateTime LastModifiedDate
        {
            get { return Convert.ToDateTime(GetData(MstCustomerContactTable.C_LAST_MODIFIED_DATE)); }
            set { SetData(MstCustomerContactTable.C_LAST_MODIFIED_DATE, value); }
        }
		
        public string LastModifiedBy
        {
            get { return Convert.ToString(GetData(MstCustomerContactTable.C_LAST_MODIFIED_BY)); }
            set { SetData(MstCustomerContactTable.C_LAST_MODIFIED_BY, value); }
        }
		
		#endregion
	}
	
	
}	

